

using [java] com.orientechnologies.orient.core.db.document::ODatabaseDocumentTx
using [java] com.orientechnologies.orient.core.record.impl::ODocument
using [java] java.util::Iterator

class DocDatabase
{
  ODatabaseDocumentTx oDatabase  { private set }
  
  new make(Str url) {
    oDatabase = ODatabaseDocumentTx(url)
  }
  
  DocDatabase create() {
    oDatabase.create
    return this
  }
  
  DocDatabase open(Str user, Str passwd) {
    oDatabase.open(user,passwd)
    return this
  }
  
  DocDatabase close() {
    oDatabase.close
    return this
  }
  
  Record createRecord(Str className) {
    Record.make(this,className)
  }
  
}
